Skip to content

WIP: Add Application Load Balancer Controller Manager#879

Open
kamilprzybyl wants to merge 23 commits intomainfrom
feat/kp/add-alb-ingress-controller
Open

WIP: Add Application Load Balancer Controller Manager#879
kamilprzybyl wants to merge 23 commits intomainfrom
feat/kp/add-alb-ingress-controller

Conversation

@kamilprzybyl
Copy link

How to categorize this PR?

What this PR does / why we need it:

Which issue(s) this PR fixes:
Fixes #

Special notes for your reviewer:

Breaking changes:

@ske-prow
Copy link

ske-prow bot commented Mar 17, 2026

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign timebertt for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@ske-prow ske-prow bot added do-not-merge/needs-kind Indicates a PR lacks a `kind/foo` label and requires one. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Mar 17, 2026
@kamilprzybyl kamilprzybyl changed the title Add Application Load Balancer Controller Manager WIP: Add Application Load Balancer Controller Manager Mar 17, 2026
@ske-prow ske-prow bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Mar 17, 2026
@kamilprzybyl kamilprzybyl force-pushed the feat/kp/add-alb-ingress-controller branch from 7ecc416 to 86bdf1d Compare March 17, 2026 09:37
// generate self-signed certificates for the metrics server. While convenient for development and testing,
// this setup is not recommended for production.
//
// TODO(user): If you enable certManager, uncomment the following lines:
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

might be good to create separate examples for that

)

const (
// externalIPAnnotation references an OpenStack floating IP that should be used by the application load balancer.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we want to reference openstack here as its deprecated?

if err != nil {
log.Printf("failed to load tls certificates: %v", err)
//nolint:gocritic // TODO: Rework error handling.
// return nil, fmt.Errorf("failed to load tls certificates: %w", err)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why is this commented out?

sort.SliceStable(ruleMetadataList, func(i, j int) bool {
a, b := ruleMetadataList[i], ruleMetadataList[j]
// 1. Host name (lexicographically)
if a.host != b.host {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does this work with * host matcher?

}

// cleanupCerts deletes the certificates from the Certificates API that are no longer associated with any Ingress in the IngressClass
func (r *IngressClassReconciler) cleanupCerts(ctx context.Context, ingressClass *networkingv1.IngressClass, ingresses []*networkingv1.Ingress) error {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we really want to delete certificates? That could be very dangerous as users might just not associate the certificate anymore and want to keep it.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Each Ingress TLS secret reference is mapped to a unique ALB Certificate resource. Even if multiple Ingresses reference the same k8s Secret, they will each trigger the creation of a separate, independent certificate on the ALB. That means, deleting one Ingress (and its associated ALB Certificate) does not impact the certificates still being used by other Ingresses.


// isCertValid checks if the certificate chain is complete. It is used for checking if
// the cert-manager's ACME challenge is completed, or if it's sill ongoing.
func isCertValid(secret *corev1.Secret) (bool, error) {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

isn't that already handled by the certificate api?

Copy link
Author

@kamilprzybyl kamilprzybyl Mar 20, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Cert API only checks if the public and private keys are matching + if the certificate is a valid X.509 format but it does not reject incomplete chains.

Renamed the function from isCertValid to isCertReady and clarified the function in the comment above.

@ske-prow ske-prow bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Mar 19, 2026
@ske-prow
Copy link

ske-prow bot commented Mar 19, 2026

PR needs rebase.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

}

if len(albIngressList) < 1 {
err := r.handleIngressClassWithoutIngresses(ctx, albIngressList, ingressClass)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It doesn't make sense to pass albIngressList if it is always empty.

@kamilprzybyl kamilprzybyl force-pushed the feat/kp/add-alb-ingress-controller branch from 4a5c760 to d8de28a Compare March 20, 2026 16:39
@kamilprzybyl kamilprzybyl force-pushed the feat/kp/add-alb-ingress-controller branch from d8de28a to f903b25 Compare March 20, 2026 19:05
@ske-prow
Copy link

ske-prow bot commented Mar 20, 2026

@kamilprzybyl: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
pull-cloud-provider-stackit-verify 3c1cc68 link true /test pull-cloud-provider-stackit-verify

Full PR test history. Your PR dashboard. Command help for this repository.
Please help us cut down on flakes by linking this test failure to an open flake report or filing a new flake report if you can't find an existing one. Also see the gardener testing guideline for how to avoid and hunt flakes.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

do-not-merge/needs-kind Indicates a PR lacks a `kind/foo` label and requires one. do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants